--- a/src/os/unix/ngx_process_cycle.c.orig	2016-02-09 15:11:58.000000000 +0100
+++ a/src/os/unix/ngx_process_cycle.c	2016-12-12 15:05:21.000000000 +0100
@@ -303,7 +303,11 @@
         }
     }
 
+
+    int ran_once=0;
+    
     for ( ;; ) {
+
         ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle");
 
         ngx_process_events_and_timers(cycle);
@@ -337,6 +341,11 @@
             ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs");
             ngx_reopen_files(cycle, (ngx_uid_t) -1);
         }
+
+	ran_once += 1;
+	//printf("ran : %d\n", ran_once);
+	if (ran_once == 2) exit(0);
+
     }
 }
